<?php 
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName( __FILE__ );

$user_id = $_SESSION["auth"]["user_id"];
//echo $user_id;
$q = 'SELECT * FROM #__vm_user_info ';
$q.= "WHERE `user_id` = $user_id ";
$my_db = new ps_DB;
$my_db->query($q);
$count = count($my_db->record);

$q = "SELECT * FROM #__vm_category WHERE `category_publish` = 'Y'";
$db = JFactory::getDBO();
$db->setQuery($q);
$category = $db->loadObjectList();
$category_id = @JRequest::getInt("category_id",$category[0]->category_id);

$tpl = vmTemplate::getInstance();
$tpl->set("category_id",@$category_id);
$tpl->set("category",@$category);
$tpl->set("my_db",$my_db);
$tpl->set("count",$count);
$flypage = "shop.userinfo.tpl";
echo $tpl->fetch( '/pages/'.$flypage . '.php' );
?>